<?php
    $baseUrl = Yii::app()->basepath;
    $fp = fopen( str_replace("protected", $baseUrl, "") . "js_dinamic\data.js", "w");
    fwrite($fp, "$('.class').val()\n");
    fwrite($fp, "23\n");
    fclose($fp);
    echo "hecho";
?>